package cn.wolfcode.crm.serivce;

import cn.wolfcode.crm.domain.Permission;
import cn.wolfcode.crm.query.QueryObject;
import cn.wolfcode.crm.util.PageResult;

import java.util.List;

public interface IPermissionService {
    void deleteByPrimaryKey(Long id);
    void saveOrUpdate(Permission record);
    Permission selectByPrimaryKey(Long id);
    PageResult query(QueryObject qo);
    List<Permission> selectAll();

    /**
     * 查询角色已有权限
     * @param id
     * @return
     */
    List<Permission> selectByRoleId(Long id);

    /**
     * 加载权限的方法
     */
    void reload();

    List<String> selectNameByEmployeeId(Long id);
}
